package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CwUserAddressesMapper;
import com.ruoyi.system.domain.CwUserAddresses;
import com.ruoyi.system.service.ICwUserAddressesService;

/**
 * 地址Service业务层处理
 * 
 * @author hyx
 * @date 2025-04-19
 */
@Service
public class CwUserAddressesServiceImpl implements ICwUserAddressesService 
{
    @Autowired
    private CwUserAddressesMapper cwUserAddressesMapper;

    /**
     * 查询地址
     * 
     * @param addressId 地址主键
     * @return 地址
     */
    @Override
    public CwUserAddresses selectCwUserAddressesByAddressId(Long addressId)
    {
        return cwUserAddressesMapper.selectCwUserAddressesByAddressId(addressId);
    }

    /**
     * 查询地址列表
     * 
     * @param cwUserAddresses 地址
     * @return 地址
     */
    @Override
    public List<CwUserAddresses> selectCwUserAddressesList(CwUserAddresses cwUserAddresses)
    {
        return cwUserAddressesMapper.selectCwUserAddressesList(cwUserAddresses);
    }

    /**
     * 新增地址
     * 
     * @param cwUserAddresses 地址
     * @return 结果
     */
    @Override
    public int insertCwUserAddresses(CwUserAddresses cwUserAddresses)
    {
        return cwUserAddressesMapper.insertCwUserAddresses(cwUserAddresses);
    }

    /**
     * 修改地址
     * 
     * @param cwUserAddresses 地址
     * @return 结果
     */
    @Override
    public int updateCwUserAddresses(CwUserAddresses cwUserAddresses)
    {
        return cwUserAddressesMapper.updateCwUserAddresses(cwUserAddresses);
    }

    /**
     * 批量删除地址
     * 
     * @param addressIds 需要删除的地址主键
     * @return 结果
     */
    @Override
    public int deleteCwUserAddressesByAddressIds(Long[] addressIds)
    {
        return cwUserAddressesMapper.deleteCwUserAddressesByAddressIds(addressIds);
    }

    /**
     * 删除地址信息
     * 
     * @param addressId 地址主键
     * @return 结果
     */
    @Override
    public int deleteCwUserAddressesByAddressId(Long addressId)
    {
        return cwUserAddressesMapper.deleteCwUserAddressesByAddressId(addressId);
    }
}
